import request from '@/utils/request'

export default class index {
  // 系统配置
  static getSystemsList(params: any = {}) {
    return request({
      url: 'api/systems',
      method: 'get',
      params
    })
  }

  static addSystems(data: any = {}) {
    return request({
      url: 'api/systems',
      method: 'post',
      data
    })
  }

  static delSystems(id: number) {
    return request({
      url: `api/systems/${id}`,
      method: 'delete',
    })
  }

  static updateSystems(id: number, data: any = {}) {
    return request({
      url: `api/systems/${id}`,
      method: 'put',
      data
    })
  }

  // app版本管理
  static getVersionsList(params: any = {}) {
    return request({
      url: 'api/versions',
      method: 'get',
      params
    })
  }

  static addVersions(data: any = {}) {
    return request({
      url: 'api/versions',
      method: 'post',
      data
    })
  }

  static delVersions(id: number) {
    return request({
      url: `api/versions/${id}`,
      method: 'delete',
    })
  }

  static updateVersions(id: number, data: any = {}) {
    return request({
      url: `api/versions/${id}`,
      method: 'put',
      data
    })
  }

  // 管理员操作日志
  static getAdminLogList(params: any = {}) {
    return request({
      url: 'api/users/logs',
      method: 'get',
      params
    })
  }

  // 黑名单语言列表
  static listBlackWord(params: any = {}) {
    return request({
      url: 'api/system/listBlackWord',
      method: 'get',
      params
    })
  }

  // 添加黑名单语言
  static addBlackWord(data: any = {}) {
    return request({
      url: 'api/system/addBlackWord',
      method: 'post',
      data
    })
  }

  // 编辑黑名单语言
  static editBlackWord(data: any = {}) {
    return request({
      url: 'api/system/editBlackWord',
      method: 'post',
      data
    })
  }

  // 删除黑名单语言
  static delBlackWord(data: any = {}) {
    return request({
      url: 'api/system/delBlackWord',
      method: 'post',
      data
    })
  }

  // 充值类型获取列表
  static nowAppPayList(params: any = {}) {
    return request({
      url: 'api/nowAppPay/list',
      method: 'get',
      params
    })
  }

  static updateGameRules(data: any = {}) {
    return request({
      url: 'api/system/updateGameRules',
      method: 'post',
      data
    })
  }
  static getGameRules(params: any = {}) {
    return request({
      url: 'api/system/getGameRule',
      method: 'get',
      params
    })
  }
}
